package com.bt.lms.ui.page.classes;

import com.bt.lms.ui.action.divide.plan.AddStuBtnAction;
import com.bt.lms.ui.action.divide.plan.DeleteStuBtnAction;
import javafx.scene.Cursor;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;

/**
 * 手动分班输入生成的分班条件
 */
public class HandCondition extends HBox {

    public HandCondition() {
        this.setSpacing(20);
        TextField iDTF = new TextField();
        iDTF.setPromptText("ID001");
        iDTF.setId("iDTF");
        TextField nameTF = new TextField();
        nameTF.setPromptText("请输入名称");
        nameTF.setId("nameTF");
        TextField numberTF = new TextField();
        numberTF.setPromptText("50");
        numberTF.setId("numberTF");
        Button addStuBtn1 = new Button("增加学员");
        Color rgb = Color.rgb(49, 193, 231);
        BackgroundFill backgroundFill = new BackgroundFill(rgb, null, null);
        Background background = new Background(backgroundFill);
        addStuBtn1.setBackground(background);
        addStuBtn1.setCursor(Cursor.HAND); //添加鼠标移入出现小手图案

        //增加学员事件
        AddStuBtnAction addStuBtnAction1 = new AddStuBtnAction();
        addStuBtn1.setOnAction(addStuBtnAction1);

        Button deleteStuBtn1 = new Button("删除学员");
        deleteStuBtn1.setBackground(background);
        deleteStuBtn1.setCursor(Cursor.HAND); //添加鼠标移入出现小手图案

        //删除学员事件
        DeleteStuBtnAction deleteStuBtnAction1 = new DeleteStuBtnAction();
        deleteStuBtn1.setOnAction(deleteStuBtnAction1);

        this.getChildren().addAll(iDTF, nameTF, numberTF, addStuBtn1, deleteStuBtn1);
    }

}
